<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

<f:view contentType="text/html;charset=UTF-8" encoding="UTF-8">
    <h:head>

    </h:head>

    <h:body>

        <h:form id="form">
            <p:panel id="panel1">Panel1</p:panel>
            <br/>
            <p:panel id="panel2">Panel2</p:panel>
            <br/>

            <p:commandButton id="btnRefresh" value="Refresh Panels" update="panel1 panel2" process="@this"/>

            <p:blockUI id="blockui" block="panel1 panel2" widgetVar="blockui"/>
           
        </h:form>

    </h:body>
</f:view>

</html>